package user

import (
	"context"
	"gf-xb-api/internal/service"

	v1 "gf-xb-api/api/user/v1"
)

func (c *ControllerV1) GetList(ctx context.Context, req *v1.GetListReq) (res *v1.GetListRes, err error) {
	data, err := service.User().GetUserList(ctx, &req.PageRequest)
	if err != nil {
		return nil, err
	}

	return (*v1.GetListRes)(data), err
}
